<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<c:set var="language" value="${language}" />
<c:if test="${language == null}">
<c:set var="language" value="en"/>
</c:if>
<fmt:setLocale value="${language}" />
<fmt:setBundle basename="ict.kth.se.text" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="${language}">
    <head>
        <!-- Meta information --> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="Author" content="Group 12"/>
        
        <!-- Title -->
        <title>Grönalund</title>
        
        <!-- Scripts -->        
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
        <script type="text/javascript" src=<c:url value="/resources/scripts/gen_validatorv4.js"/>> </script>        

        <!-- Stylesheets --> 
        <link rel="stylesheet" href=<c:url value="/resources/css/style.css"/> />
		<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'/>        
    </head>
    
    <body>
    	<%@ include file="header.jsp" %>
    	<div id="wrapper">        
            <div class="tabs">
             	<!-- tabs -->
            	<ul id="menu" class="tabNavigation">
		    		<li><a href="<c:url value="/?language=${language}"/>" title="Seeker" class="active"><label for="jobSeek"><fmt:message key="home.label.jobSeek" /></a></li>
                    <li><a href="<c:url value="/admin?language=${language}"/>" title="Login"><label for="recLogin"><fmt:message key="home.label.recLogin" /></a></li>
                    <security:authorize ifAnyGranted="ROLE_ADMIN,ROLE_RECRUITER">
                    	<li><a href="<c:url value="/j_spring_security_logout?language=${language}"/>" title="Logout"><label for="logOut"><fmt:message key="home.label.logOut" /></a></li>
                    </security:authorize>
				</ul>            
                <!-- tab containers -->
                 
                <div id="content_container">
                      <div id="peer">
                            <div id="peer_wrapper">
                            	<div class="spacer"> </div>
                            	<h1> <label for="regApp"><fmt:message key="home.label.regApp" /> </h1>
                                <form name="seeker_form" action="createNewSeeker"  method="post">
                                <label for="firstName"><fmt:message key="home.label.firstName" />: <br/><input type="text" name="firstName" class="inputtext" /><br/>
                                <label for="lastName"><fmt:message key="home.label.lastName" />: <br/><input type="text" name="lastName" class="inputtext" /> <br/>
                                <label for="email"><fmt:message key="home.label.email" />:<br/><input type="text" name="email"  class="inputtext" /> <br/>
                                <fmt:message key="home.button.send" var="buttonValue" />
                                <input type="submit" name="send" class="button" value="${buttonValue}"/>
                                </form>
                                <!-- Validation -->
                                <script  type="text/javascript">
									 var frmvalidator = new Validator("seeker_form");
									 frmvalidator.addValidation("firstName","req","Please enter your First Name");
									 frmvalidator.addValidation("lastName","req","Please enter your Last Name");
									 frmvalidator.addValidation("email","maxlen=50");
									 frmvalidator.addValidation("email","req","Please enter your email");
									 frmvalidator.addValidation("email","email", "Please enter a valid email");
								</script>                               
                            </div>                
                      </div>
                </div>
            </div>                  
    	</div>   
    </body>
</html>